﻿@model IEnumerable<dynamic>
@{
    ViewBag.Title = "Configuration";
    ViewBag.MnuLevel1 = "system";
    ViewBag.MnuLevel2 = "configuration";
    Layout = "~/Areas/Administrator/Views/Shared/_Layout.cshtml";
}
@section navigation
{
    <ul class="breadcrumbs">
        <li><a href="@Url.Action("Index",
                                 "Dashboard")"><i class="iconfa-home"></i></a><span class="separator">
            </span></li>
        <li>Configuration</li>
    </ul>
}
@section header
{
    <div class="pageheader">
        <div class="pageicon">
            <span class="iconfa-briefcase"></span>
        </div>
        <div class="pagetitle">
            <h1>
                Configuration</h1>
        </div>
    </div>
}
@(Html.Telerik()
      .Grid(Model)
      .Name("grid")
      .Columns(c =>
                   {
                       c.Bound(typeof(int),
                               "Id")
                        .Title("#")
                        .Width(50);
                       c.Bound(typeof(string),
                               "Name")
                        .Title("Name");
                       c.Template(v => v.Id)
                        .ClientTemplate(Html.ActionLink("<span class=\"t-icon t-edit\"></span>",
                                                        "Edit",
                                                        new
                                                            {
                                                                id = "<#=Id#>"
                                                            },
                                                        new
                                                            {
                                                                @class = "t-button t-button-icon t-grid-edit",
                                                            })
                                            .ToHtmlString())
                        .Width(40);
                   })
      .Sortable(c => c.Enabled(true))
      .Filterable()
      .DataKeys(c => c.Add("Id"))
      .Pageable(c =>
                    {
                        c.Enabled(true);
                        c.PageSize(25);
                    })
      .DataBinding(c => c.Ajax()
                         .Select("GetList",
                                     "Config")))